
# EasyCodeReaderLive_Neoapi_Qt

This code sample sample shows how to use Open eVision in a live application to read Barcodes, Data Matrix codes or
QR codes. It is mostly aimed at being a demonstration of Open eVision on embedded platforms like smart cameras.

This code sample is available in many different variants. The one you are currently reading is using:

* A desktop application using Qt.
* The Neoapi library (a library specific to smart cameras produced by Baumer).

Please note that the current sample was distributed along with other similar samples providing other connectivity
possibilities. Please consult those other samples if the current one is not appropriate for your use case.

## Dependencies

### Open eVision

This sample depends on Open eVision. Please install it in a version suitable for your platform.

All Open eVision releases are available at this address: https://www.euresys.com/en/Support/Download-area

### GCC


This sample necessitates a GCC building solution able to compile C++ 17.


To install it on a Debian-based operating system use this command:

```
sudo apt install build-essential
```

### CMake

This sample necessitates CMake >= 3.1.0 .

To install it on a Debian-based operating system use this command:

```
sudo apt install cmake
```

### Qt

This sample necessitates Qt 5.

To install the necessary packages on a Raspberry Pi use the following command:

```
sudo apt install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
```

To install those tools on a Nvidia Jetson system use this command instead:

```
sudo apt install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
```
### Neoapi

This sample necessitates the Neoapi library by Baumer.

If you are using a smart camera that recommends the usage of the Neoapi library it is quite likely already installed
on your camera. If that is not the case please consult the documentation of your smart camera.

## Switching type of code reader (Barcodes, Matrixcodes or QRcodes)

This project support multiple type of codes, but only one of them at a given time. By default it will read Barcodes.

If you want to change the type of code that this sample will read modify the `ProcessingHandler.cpp` file and change
the following block of code according to your need:

```
// Choose one processing in BarCode, MatrixCode or QRCode
#define BarCodeProcessing
//#define MatrixCodeProcessing
//#define QRCodeProcessing
```

## Compiling this sample

Use the following commands in order to compile your project:

```bash
mkdir build
cd build
cmake ..
make -j2
```

Alternatively, you could build the sample by using Qt Creator. To do so, open the CMakeLists.txt file in Qt Creator.

## Using this sample

When launched this sample will display a camera output showing the images produced by the camera. If a code is detected
in the image it will be displayed with a rectangle indicating the position of the code and its content.

